package com.sdap2.dao;

import com.sdap2.common.dao.LogicDAO;
import com.sdap2.entity.Greenhouse;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Repository;
import java.util.Optional;

@Repository
public interface GreenhouseDAO extends LogicDAO<Greenhouse, Long> {
    Page<Greenhouse> findAllByUserId(Long userId, Pageable pageable);
    
    boolean existsByBoxNo(String boxNo);
    
    Optional<Greenhouse> findByBoxNo(String boxNo);
} 